//
//  CSRHelper.m
//  DevSpoof
//
//  Created by huang on 2018/11/7.
//  Copyright © 2018年 wdys. All rights reserved.
//

#import "CSRHelper.h"

@implementation CSRHelper
+ (NSString *)randomEmail{
    NSArray *types = @[@"@163.com",@"@gmail.com",@"@icloud.com",@"@foxmail.com"];
    NSString *randomType = types[arc4random_uniform((uint32_t)types.count)];
    NSUInteger range = arc4random_uniform(11)+5; // 5-15
    NSString *charectors = @"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPWRSTUVWXYZ";
    NSMutableString *randomNum = [NSMutableString string];
    for (int i = 0; i < range; i++) {
        NSUInteger random = arc4random_uniform((uint32_t)charectors.length);
        [randomNum appendFormat:@"%c",[charectors characterAtIndex:random]];
    }
    return [NSString stringWithFormat:@"%@%@",randomNum,randomType];
}
@end
